-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DialV2: add support for custom timeouts #64
Conversation
What do you think about using the functional options pattern here? It would result in an API like |
bmc.go
Outdated
@@ -23,36 +23,55 @@ var ( | |||
namespace = "bmc" | |||
) | |||
|
|||
type Config struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this have a more descriptive name? E.g., V2SessionlessTransportConfig
or DialConfig
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree Config is a little too generic. I would use DialConfig and DialConfigOption. I'm not sure what the conventions are around exporting DialConfig - can we get away with dialConfig?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get away with dialConfig?
I believe we can: https://pkg.go.dev/golang.org/x/net/idna#Option
Add support for custom transport timeouts. Discussed here.